import java.util.Scanner;

public class Demo10 {
    public static int isQuite = 0;
    public static void main(String[] args) {
        Thread thread1 = new Thread(() -> {
           while(isQuite == 0) {

           }
            System.out.println("threade1结束");
        }) ;
        Thread thread2 = new Thread(() -> {
            Scanner scanner = new Scanner(System.in);
            isQuite = scanner.nextInt();
        });
        thread1.start();
        thread2.start();
    }
}
